'use strict';

const Service = require('egg').Service;

class UserService extends Service {
  // 新建用户
  async create(info) {
    const create = this.ctx.model.User.create(info)
    return create
  }
  // 查询用户信息
  async find(info) {
    const find = this.ctx.model.User.find(info)
    return find
  }
  // 修改角色用户名
  async update(openid,info) {
    const update = this.ctx.model.User.updateOne(openid, info)
    return update
  }
}

module.exports = UserService;
